package cn.fx.framework.core;

import cn.fx.framework.utils.StringUtils;

import java.util.Map;

/**
 * 提供接口时，使用此类返回响应代码及对应的说明
 *
 * @author fxcn
 * @since 2024-9-29
 */
public class CodeMessage implements java.io.Serializable {
    private static final long serialVersionUID = 201311260908L;

    public Integer code = 0;
    public String message;

    public CodeMessage() {
    }

    public CodeMessage(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public void setCode(int code) {
        this.code = code;
    }

    /**
     * 获取错误代码
     *
     * @return
     */
    public Integer getCode() {
        return code;
    }


    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * 获取错误信息
     *
     * @return
     */
    public String getMessage() {
        return message;
    }


    @Override
    public String toString() {
        return "CodeMessage{" +
                "code=" + code +
                ", message=\"" + message + "\"" +
                '}';
    }
}
